﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ue.Qcdz.Domain.Shops;
using Ue.Qcdz.Domain.ShopArticle;

namespace Ue.Qcdz.Domain
{
    /// <summary>
    /// 商铺新闻
    /// </summary>
    public partial class SiteUrls
    {
        /// <summary>
        /// 前台商铺新闻列表
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public string ShopNewsList(object key)
        {
            return this.BuildUrl("ShopNewsList", (key as ShopNews).Key);
        }
        /// <summary>
        /// 前台商铺新闻详细
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public string ShopNewsShow(object key)
        {
            if (key is ShopNews)
                return this.BuildUrl("ShopNewsShow", (key as ShopNews).Key);
            else
                return this.BuildUrl("ShopNewsShow", key);
        }

        /// <summary>
        /// 管理员 管理新闻URL
        /// </summary>
        /// <returns></returns>
        public string ShopNewsManage()
        {
            return this.BuildUrl("ShopNewsManage", null);  
        }
        /// <summary>
        /// 新闻中心（用户管理）
        /// </summary>
        /// <returns></returns>
        public string ShopNews()
        {
            return this.BuildUrl("ShopNews", null);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        public string ShopNewsEdit()
        {
            if (SiteContext.GetSiteContext().User != null)
            {
                Shop shop = SiteContext.GetSiteContext().Shop;
                if (shop != null)
                    return this.BuildUrl("ShopNewsEdit", null);
            }
            return "#";
        }
    }
}
